using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;
using Granite.Xaml.Converters;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Granite.Xaml.Tests.Converters
{
	[TestClass]
	public class NullToVisibleConverterTests : ConverterTest<NullToVisibleConverter>
	{

		[TestMethod]
		public void NullToVisibleConverter_Test()
		{
			Convert(Visibility.Visible, null);
			Convert(Visibility.Visible, null, Visibility.Collapsed);
			Convert(Visibility.Visible, null, Visibility.Hidden);
			Convert(Visibility.Visible, null, "Collapsed");
			Convert(Visibility.Visible, null, "Hidden");

			Convert(Visibility.Collapsed, 0);
			Convert(Visibility.Collapsed, 0, Visibility.Collapsed);
			Convert(Visibility.Hidden, 0, Visibility.Hidden);
			Convert(Visibility.Collapsed, 0, "Collapsed");
			Convert(Visibility.Hidden, 0, "Hidden");

			Convert(Visibility.Visible, "");
			Convert(Visibility.Visible, "", Visibility.Collapsed);
			Convert(Visibility.Visible, "", Visibility.Hidden);
			Convert(Visibility.Visible, "", "Collapsed");
			Convert(Visibility.Visible, "", "Hidden");

			Convert(Visibility.Collapsed, "a");
			Convert(Visibility.Collapsed, "a", Visibility.Collapsed);
			Convert(Visibility.Hidden, "a", Visibility.Hidden);
			Convert(Visibility.Collapsed, "a", "Collapsed");
			Convert(Visibility.Hidden, "a", "Hidden");

			NoConvertBack();
		}
	}
}
